package com.xxx.shiro.dao;

import java.util.Set;

import com.xxx.shiro.entity.CacheUser;

/**
 * <p>
 * User: Zhang Kaitao
 * <p>
 * Date: 14-1-28
 * <p>
 * Version: 1.0
 */
public interface CacheUserDao {

	public CacheUser createUser(CacheUser user);

	public void updateUser(CacheUser user);

	public void deleteUser(Long userId);

	public void correlationRoles(Long userId, Long... roleIds);

	public void uncorrelationRoles(Long userId, Long... roleIds);

	CacheUser findOne(Long userId);

	CacheUser findByUsername(String username);

	Set<String> findRoles(String username);

	Set<String> findPermissions(String username);
}
